﻿using System.Collections;
using System.Collections.Generic;
using System.Xml.Linq;
using UnityEngine;
using UnityEngine.UIElements;

public class TestADDcHAT : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    [ContextMenu("TestAddChat")]
    public void TestAddChat()
    {
        AddChat(2, MGame.instance.MUser.id, "哈喽！");
    }
    void AddChat(long fromId,long candidateId, string content)
    {
        MGame.instance.MUser.AddDialogue(fromId,candidateId, content, UnityFunctions.GetTimeStampSeconds());
    }

    [ContextMenu("ClearChats")]
    void ClearChats() 
    {
        MGame.instance.MUser.chats.Clear();
    }

    [ContextMenu("TestAddReceiveApply")]
    public void TestAddReceiveApply()
    {
        MGame.instance.MUser.AddApply(4,MGame.instance.MUser.id, Apply.Applying, "想和你认识一下~","",UnityFunctions.GetTimeStampSeconds());
    }

    [ContextMenu("TestAddRequestApply")]
    public void TestAddRequestApply()
    {
        MGame.instance.MUser.AddApply(MGame.instance.MUser.id,2, Apply.ApplyResult_Fail, "想和你认识一下~","没有眼缘" ,UnityFunctions.GetTimeStampSeconds());
    }
    // Update is called once per frame
    void Update()
    {
        
    }
}
